<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://xmlns.jcp.org/jsf/html">

    <body>

        <ui:composition template="./resources/plantillas/plantilla_general.xhtml">

            <ui:define name="content">
                <p:growl id="growl" life="2000" showDetail="true"/>
                <h:form>
                <br/>
                <br/>
                <br/>                    
                <div align="center">
                <p:panel header="Acceso al sistema" style="width:50%;">
<!--                    <div align="center">-->
                            <h:panelGrid columns="2" cellpadding="20">
                                <h:panelGrid styleClass="panelGridCenter">
                                    <h:graphicImage library="images" name="login.png" alt="Acceso a usuarios" height="256" width="256"/>
                                    <!--<h:graphicImage library="images" name="login.png" />-->
                                </h:panelGrid>

                                <h:panelGrid>
                                        <h:panelGrid columns="2" >
                                                <h:outputLabel for="username" value="Usuario: " />
                                                <p:inputText value="#{loginControlador.username}" id="username"
                                                        required="true" label="username" />

                                                <h:outputLabel for="password" value="Contraseña: " />
                                                <p:password value="#{loginControlador.password}" id="password"
                                                        required="true" label="password" />

                                                <p:commandButton id="loginButton" value="Iniciar"
                                                                 action="#{loginControlador.loginControl()}"/>

                                        </h:panelGrid>
                                        <p:growl id="growl" showDetail="true" life="3000" />
                                </h:panelGrid>
                            </h:panelGrid>
<!--                        </div>-->
                </p:panel>
                </div>
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
